home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
dskut
/
copyd11.zip
/
WSSCOPYD.DOC
< prev
next >
Wrap
Text File
|
1992-12-06
|
10KB
|
225 lines
WSScopyd version 1.1
Copyright December 6, 1992 by Robert W. Babcock and WSS Division of DDC
Unlimited non-commercial use authorized.
I. Abstract
WSScopyd.exe version 1.1
Makes single/multiple copies of floppy disks with single insertion of master.
Optionally formats target disks. Can save a floppy image to disk and play
it back later.
II. Introduction
On consecutive days I received Borland C++ 3.1, IBM OS/2 2.0 and Microsoft C
7.0. Each of these includes a huge pile of disks, and I wanted to make backup
copies. No problem I thought, I'll just run COPYQM in a Desqview window and
make the copies while working on other things. Well, it turns out that COPYQM
doesn't work very well under Desqview. Ordinarily, COPYQM senses when you
have swapped disks, but under DV it sees swaps that didn't happen and
otherwise misbehaves. I tried about 10 other DISKCOPY replacements, and most
of them were worse. In particular, even under DOS, most could not handle my
secondary floppy controller. So, I decided to write my own Desqview-friendly
disk copying utility, WSScopyd. I still use COPYQM outside of Desqview; it
works well and the registration fee is low.
III. Requirements
5.25" or 3.5" floppy drive
Master disk with no bad sectors marked in FAT
DOS 3 or higher
Hard or RAM disk space sufficient to hold image of disk being copied
IV. Configuration
WSScopyd reads a configuration file which tells it (1) what drive letters are
valid (2) unit number for low-level access and (3) drive characteristics. The
configuration file is named WSSCOPYD.CFG. This file is searched for first in
the directory WSScopyd was loaded from, then in the current directory, and
finally on the path. The configuration file is straight ascii text. Initial
lines are comments; the important stuff follows a line which begins with at
least 10 dashes. Each drive-defining line has 3 fields, separated by
whitespace (spaces or tabs). A sample file might look like
This is a WSScopyd configuration file
----------------------------------------------------
A: 0 1.2MB
B: 1 1.44MB
The first field is the drive letter. Colon is optional.
The second field is the (decimal) unit number used for interrupt 13h access to
the drive. For A: and B:, these numbers should be 0 and 1 respectively. For
any other floppy drives, the access numbers depend on the details of the
device driver used to access the floppy. For example, with a MicroSolutions
Compaticard secondary floppy controller, the first floppy after A: is unit 4.
In general, it may be necessary to determine the unit number experimentally:
try a number and see which floppy spins, if any, when WSScopyd tries to read a
disk. Hard disk unit numbers start at 128, and WSScopyd won't let you use
such numbers, so experimentation should be safe.
The third field is the drive capacity. Recognized values are
360 - 5.25" DSDD drive (single sided should also work)
12 or 1.2 - 5.25" HD drive
72 - 3.5" DD drive
144 or 1.44 - 3.5" HD drive
Additional characters are ignored, so most natural ways of listing the
capacity (1200K, 1.2MB,...) are recognized.
V. Usage
WSScopyd uses a single disk drive. The floppy being copied and preformatted
target disks must have no bad sectors marked in the FAT. WSScopyd reads a
floppy, saves the disk image in a temporary file, optionally formats a blank
disk, writes the saved image on the floppy, and optionally re-reads the disk
and compares with the saved disk image. A simple bar graph display indicates
progress of each step. To start copying, invoke WSScopyd by
wsscopyd [options] d: [options]
Where d: is the drive to use for copying (A:, B:,...). This must be a
removable disk; the program will complain and stop if it isn't. Options are
of the form -letter or /letter, possibly followed by a value. A space between
the option letter and the value is optional. Anything not of this form is
assumed to be the disk mode letter (the colon is not really necessary). Case
of options is ignored. Recognized options are
-B - beep when disk change is needed
-Cn - number of copies (may be zero if -S option specified)
-F - format target disk
-R fn - reuse saved file fn
-S fn - save disk file with name fn
-T - display time used
-V - verify by reading floppy and comparing to original data
-X1 - disk is single-sided, 10 sectors per track, 80 tracks
-X2 - disk is double-sided, 10 sectors per track, 80 tracks
-X3 - disk is RX-50 (like X1 but tracks after 1st two are 2:1 interleave)
-X format source disks do not need to have a valid boot sector. Volume label
will not be displayed during copying when -X is specified because DOS may not
be able to read such disks without special drivers.
If neither the -R nor the -S option is specified, the temporary file is placed
in the directory pointed to by the TEMP or TMP environment variable. One of
these must be defined.
Disk verification is done on a separate pass. This is slightly slower than
verifying immediately after writing, but I think (with no real evidence) that
giving a marginal sector more time to forget what was written is a good idea.
Note that this is a real verify; data read from the floppy is compared with
what was previously written. DOS verify reads a disk and complains if there
are CRC errors, but does not inspect the data.
VI. Desqview compatibility
If you use the default Desqview setup, you will probably get unspeakably poor
performance for all floppy operations. As I understand it, this is because
floppy I/O must go through a buffer in the first megabyte of memory, and by
default this buffer is only 2K long. Whenever this buffer fills or empties,
DV must copy data to or from your program's buffer. When this happens, you
can't get the I/O started before the next sector has gone by, so you have to
wait for a full revolution before continuing. It's similar to the performance
degradation you get if a hard disk has too small an interleave. The solution
is to use the DV SETUP program to increase "DOS buffers for EMS". If you
double this buffer size one or more times, you will notice large decreases in
the time needed for floppy operations. WSScopyd has a timer option which will
tell you how long it takes to read, format, write or verify a disk. These
times decrease as the buffer size is increased to 32K, and maybe beyond. (But
memory available in a window decreases.) Note that any change in buffer size
only takes effect if you exit DV and restart it. Comments in the source code
include a table of time to read a 360K disk as a function of the EMS buffer
size.
WSScopyd is written to work under Desqview, yet it doesn't even need to detect
whether DV is active. Everything is done with BIOS calls, and there are no
polling loops, and that's all that DV needs. One little DV compatibility
feature is that WSScopyd does not use the first or last two screen columns so
all of its output can be seen in a full-width window with borders. One big
problem is that performance in other windows degrades significantly when
WSScopyd is working. I don't know if there is any way around this.
VII. OS/2 compatibility
WSScopyd sort of works in a DOS window under OS/2, but it runs slowly and
sometimes gets spurious read errors. There may be some tuning parameters
which need to be set, similar to the Desqview EMS buffers. A likely suspect
is keyboard idle sensitivity. The 10-sector options probably won't work
under OS/2.
To get my secondary floppy controller to work under OS/2, I had to move it to
IRQ 5. This broke the version of COPYQM I had been using, even under DOS, but
WSScopyd still works, as does the latest COPYQM.
VIII. Acknowledgements, in alphabetical order
Ralf Brown, compiler of INTERxxx interrupt list.
Edward V. Dong, author of ZFMAT.
Roedy Green who pointed out that I had to check the FAT for bad sectors.
Sydex (COPYQM) - My progress bar is patterned after thei